package com.xauto.pioneer.appuser.activity.mine;

import android.content.Intent;
import android.view.View;
import android.widget.LinearLayout;

import com.xauto.pioneer.appuser.R;
import com.xauto.pioneer.appuser.activity.BaseActivity;
import com.xauto.pioneer.appuser.activity.mine.receipt.ApplyCarReceiptActivity;
import com.xauto.pioneer.appuser.activity.mine.receipt.ApplyParkingReceiptActivity;
import com.xauto.pioneer.appuser.activity.mine.receipt.ReceiptHistoryActivity;
import com.xauto.pioneer.appuser.activity.mine.receipt.ReceiptInputActivity;
import com.xauto.pioneer.appuser.view.TopBar;

import butterknife.Bind;
import butterknife.OnClick;

/**
 * 发票开取
 * Created by Administrator on 2018/5/22.
 */

public class ReceiptActivity extends BaseActivity {

    @Bind(R.id.ac_receipt_topBar)
    TopBar ac_receipt_topBar;

    @Bind(R.id.ll_receipt_input)
    LinearLayout ll_receipt_input;
    @Bind(R.id.ll_receipt_history)
    LinearLayout ll_receipt_history;
    @Bind(R.id.ll_applyparkingreceipt)
    LinearLayout ll_applyparkingreceipt;
    @Bind(R.id.ll_applycarreceipt)
    LinearLayout ll_applycarreceipt;

    @Override
    protected int getContentView() {
        return R.layout.ac_receipt;
    }

    @Override
    protected void initView() {
        ac_receipt_topBar.showView(TopBar.TITLE, TopBar.LEFT_IMAGE_BTN);
        ac_receipt_topBar.setText(TopBar.TITLE, getString(R.string.mine_receipt));
        ac_receipt_topBar.setImage(TopBar.LEFT_IMAGE_BTN, R.mipmap.ic_common_left);
        ac_receipt_topBar.setLeftOnClick(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });
    }

    @Override
    protected void initData() {

    }
    @OnClick({R.id.ll_receipt_input,R.id.ll_receipt_history,R.id.ll_applyparkingreceipt,R.id.ll_applycarreceipt})
    public void onClick(View v){
        switch (v.getId()){
            //发票信息录入
            case R.id.ll_receipt_input:
                startActivity(new Intent(mContext, ReceiptInputActivity.class));
                break;
            //停车历史列表
            case R.id.ll_receipt_history:
                startActivity(new Intent(mContext, ReceiptHistoryActivity.class));
                break;
            //申请停车发票
            case R.id.ll_applyparkingreceipt:
                startActivity(new Intent(mContext, ApplyParkingReceiptActivity.class));
                break;
            //申请停车发票
            case R.id.ll_applycarreceipt:
                startActivity(new Intent(mContext, ApplyCarReceiptActivity.class));
                break;
        }
    }
}
